<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Home</title>
    <!-- Icomoon Icon Fonts-->
    <link rel="stylesheet" href="${request.contextPath}/static/login-css/icomoon.css">
    <!-- Themify Icons-->
    <link rel="stylesheet" href="${request.contextPath}/static/login-css/themify-icons.css">
    <!-- Bootstrap  -->
    <link rel="stylesheet" href="${request.contextPath}/static/login-css/bootstrap.css">
    <!-- Theme style  -->
    <link rel="stylesheet" href="${request.contextPath}/static/login-css/style.css">
    <script type="text/javascript" src="${request.contextPath}/static/js/jquery-1.11.1.min.js"></script>
    <script>
        $(document).ready(function(){
            $.get("/getBingWallPaper",function(data,status){
                if(status=="success")
                    $("#gtco-header").css("background-image","url("+data+")");
                if(status=="error")
                    alert("Error: "+status+": "+data);
            });
        });
        function login() {
            if (jvForm.username.value == "") {
                alert("用户名不能为空！");
                return false;
            } else if (jvForm.password.value == "") {
                alert("密码不能为空！");
                return false;
            }
        }
        function signup() {
            var username = sgForm.username.value;
            var password = sgForm.password.value;
            var repeat_password = sgForm.repeat_password.value;
            if ( username == "") {
                alert("用户名不能为空！");
                return false;
            } else if (password == "") {
                alert("密码不能为空！");
                return false;
            } else if (repeat_password== "") {
                alert("确认密码不能为空！");
                return false;
            }

            if(password != repeat_password){
                alert("前后密码不一致，请检查后重新输入！");
                return false;
            }
            document.getElementById("sg_submit").disabled=true
            return true;
        }
    </script>

</head>
<body>

<div class="gtco-loader"></div>
<div id="page">
    <div class="page-inner">
        <header id="gtco-header" class="gtco-cover" role="banner" <#--style="background-image: url(https://cn.bing.com//th?id=OHR.PuffinSkomer_ZH-CN4039641381_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp)"-->>
            <div class="overlay"></div>
            <div class="gtco-container">
                <div class="row">
                    <div class="col-md-12 col-md-offset-0 text-left">
                        <div class="row row-mt-15em">
                            <div class="col-md-7 mt-text animate-box" data-animate-effect="fadeInUp">
                                <span class="intro-text-small">关注个人消费>>>>>></span>
                                <h1>提升生活品质↗↑</h1>
                            </div>
                            <div class="col-md-4 col-md-push-1 animate-box" data-animate-effect="fadeInRight">
                                <div class="form-wrap">
                                    <div class="tab">
                                        <ul class="tab-menu">
                                            <li class="gtco-first"><a href="#" data-tab="signup">注册</a></li>
                                            <li class="gtco-second active"><a href="#" data-tab="login">登录</a></li>
                                        </ul>
                                        <div class="tab-content">
                                            <div class="tab-content-inner" data-content="signup">
                                                <form id="sgForm" name="sgForm" action="/toSignup" method="post" onsubmit="return signup();">
                                                    <div class="row form-group">
                                                        <div class="col-md-12">
                                                            <label for="username">账号:</label>
                                                            <input type="text" class="form-control" id="username" name="username"/>
                                                        </div>
                                                    </div>
                                                    <div class="row form-group">
                                                        <div class="col-md-12">
                                                            <label for="password">密码:</label>
                                                            <input type="password" class="form-control" id="password" name="password"/>
                                                        </div>
                                                    </div>
                                                    <div class="row form-group">
                                                        <div class="col-md-12">
                                                            <label for="repeat_password">确认密码:</label>
                                                            <input type="password" class="form-control" id="repeat_password" name="repeat_password"/>
                                                        </div>
                                                    </div>

                                                    <div class="row form-group">
                                                        <div class="col-md-12">
                                                            <input type="submit" class="btn btn-primary" id="sg_submit" value="注册">
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>

                                            <div class="tab-content-inner active" data-content="login">
                                                <form id="jvForm" name="jvForm" action="login" method="post" onsubmit="return login();">
                                                    <div class="row form-group">
                                                        <div class="col-md-12">
                                                            <label for="username">账号:</label>
                                                            <input type="text" class="form-control" id="username" name="username"/>
                                                        </div>
                                                    </div>
                                                    <div class="row form-group">
                                                        <div class="col-md-12">
                                                            <label for="password">密码:</label>
                                                            <input type="password" class="form-control" id="password" name="password"/>
                                                        </div>
                                                    </div>

                                                    <div class="row form-group">
                                                        <div class="col-md-12">
                                                            <input type="submit" class="btn btn-primary" value="登录">
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </header>

        <footer id="gtco-footer" role="contentinfo">
            <div class="gtco-container">
                <div class="row copyright">
                    <div class="col-md-12">
                        <p class="pull-left">
                            <small class="block"><b>Copyright &copy; 2018.畅想未来</b></small>
                        </p>
                        <p class="pull-right">
                        <ul class="gtco-social-icons pull-right">
                            <li><a href="#"><i class="icon-twitter"></i></a></li>
                            <li><a href="#"><i class="icon-facebook"></i></a></li>
                            <li><a href="#"><i class="icon-linkedin"></i></a></li>
                            <li><a href="#"><i class="icon-dribbble"></i></a></li>
                        </ul>
                        </p>
                    </div>
                </div>

            </div>
        </footer>
    </div>

</div>

<div class="gototop js-top">
    <a href="#" class="js-gotop"><i class="icon-arrow-up"></i></a>
</div>

<!-- jQuery -->
<script src="${request.contextPath}/static/login-js/jquery.min.js"></script>
<!-- jQuery Easing -->
<script src="${request.contextPath}/static/login-js/jquery.easing.1.3.js"></script>
<!-- Bootstrap -->
<script src="${request.contextPath}/static/login-js/bootstrap.min.js"></script>
<!-- Waypoints -->
<script src="${request.contextPath}/static/login-js/jquery.waypoints.min.js"></script>
<!-- Carousel -->
<script src="${request.contextPath}/static/login-js/owl.carousel.min.js"></script>
<!-- countTo -->
<script src="${request.contextPath}/static/login-js/jquery.countTo.js"></script>
<!-- Magnific Popup -->
<script src="${request.contextPath}/static/login-js/jquery.magnific-popup.min.js"></script>
<script src="${request.contextPath}/static/login-js/magnific-popup-options.js"></script>
<!-- Main -->
<script src="${request.contextPath}/static/login-js/main.js"></script>

</body>
</html>